﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 学科基础输入参数
    /// </summary>
    public class XuekeBaseInput
    {
        /// <summary>
        /// 编码
        /// </summary>
        public virtual string? Code { get; set; }
        
        /// <summary>
        /// 名称
        /// </summary>
        public virtual string? Name { get; set; }
        
        /// <summary>
        /// 简称
        /// </summary>
        public virtual string? ShortName { get; set; }
        
        /// <summary>
        /// 启用
        /// </summary>
        public virtual bool? Enable { get; set; }
        
        /// <summary>
        /// 主科
        /// </summary>
        public virtual bool? IsMain { get; set; }
        
        /// <summary>
        /// 序号
        /// </summary>
        public virtual string? SortIndex { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public virtual string? Remark { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
    }

    /// <summary>
    /// 学科分页查询输入参数
    /// </summary>
    public class XuekeInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 编码
        /// </summary>
        public string? Code { get; set; }
        
        /// <summary>
        /// 名称
        /// </summary>
        public string? Name { get; set; }
        
        /// <summary>
        /// 简称
        /// </summary>
        public string? ShortName { get; set; }
        
        /// <summary>
        /// 启用
        /// </summary>
        public bool? Enable { get; set; }
        
        /// <summary>
        /// 主科
        /// </summary>
        public bool? IsMain { get; set; }
        
        /// <summary>
        /// 序号
        /// </summary>
        public string? SortIndex { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
        
    }

    /// <summary>
    /// 学科增加输入参数
    /// </summary>
    public class AddXuekeInput : XuekeBaseInput
    {
        /// <summary>
        /// 编码
        /// </summary>
        [Required(ErrorMessage = "编码不能为空")]
        public override string? Code { get; set; }
        
        /// <summary>
        /// 名称
        /// </summary>
        [Required(ErrorMessage = "名称不能为空")]
        public override string? Name { get; set; }
        
        /// <summary>
        /// 启用
        /// </summary>
        [Required(ErrorMessage = "启用不能为空")]
        public override bool? Enable { get; set; }
        
        /// <summary>
        /// 主科
        /// </summary>
        [Required(ErrorMessage = "主科不能为空")]
        public override bool? IsMain { get; set; }
        
    }

    /// <summary>
    /// 学科删除输入参数
    /// </summary>
    public class DeleteXuekeInput : BaseIdInput
    {
    }

    /// <summary>
    /// 学科更新输入参数
    /// </summary>
    public class UpdateXuekeInput : XuekeBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 学科主键查询输入参数
    /// </summary>
    public class QueryByIdXuekeInput : DeleteXuekeInput
    {

    }
